package com.techysky.entity;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Entity
@Table(name="sys_question")
@Data@EqualsAndHashCode(callSuper=false)
public class Question extends BaseEntity{

	private static final long serialVersionUID = 1L;
	@Column(name="create_date")
	private String createDate;
	@Column(name="create_user")
	private String createUser;
	@Column(name="content")
    private String content;
	@Column(name="A")
    private String A;
	@Column(name="B")
    private String B;
	@Column(name="C")
    private String C;
	@Column(name="D")
    private String D;
	@Column(name="E")
    private String E;
	@Column(name="ANSWER",length=1024)
    private String answer;
	@Column(name="SEXPLAIN",length=1024)
    private String explain;
	//@Column(name="data_model_id")
	@Transient
    private String dataModelId;
	@Transient
	private String status;	
	@Transient
	private int order;	
	@JsonIgnore
	@OneToMany(cascade={CascadeType.REMOVE},mappedBy = "question",fetch=FetchType.EAGER)
    private Set<QuestionPaper> questionPaper;
}